home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / CC_C / 0151.ZIP / TF.DOC < prev    next >
Text File  |  1985-10-28  |  8KB  |  196 lines

  1. .he TF -- Text Formatter -- 15 Oct 85                                         Page #
  2. .sh Fido Software 2269 Market St #118 San Francisco CA 94114
  3. .pl 88
  4. .. format 120f
  5. 
  6.     TF is a text formatter that started out supporting some WordStar like dot commands, and ended up being extendedì
  7. a bit. TF is most easy to use with Pmate and Index.
  8.  
  9.     This is not an elaborate manual; it is mostly a place to write down the side effects and functions supportedì
  10. until someone writes a real manual someday.
  11.  
  12.     TF processes ASCII MSDOS text files. Dot commands are used to modify the way TF handles the text stream; linesì
  13. beginning with a dot in the leftmost column are taken to be commands. Dot commands tend to make global changes, such asì
  14. margins, headers, including other files, etc. These commands are listed later.
  15.  
  16.     Control codes are used for other funtions, usually inline formatting and other controls, such as bold, underlineì
  17. and other special features. Besides the usual CR, LF, FF and so on, otherwise undefined control codes can be used asì
  18. macros; if properly defined, the control code itself is replaced with a string of characters. These strings can beì
  19. defined with dot commands. Some are predefined to support an Okidata 192 printer, but these can be redefined at anyì
  20. time.
  21. .pa
  22.             Operation
  23.  
  24.     TF processes a source file from disk and outputs to another file. The output filename by default is "PRN". Thisì
  25. can be changed with a command line option.
  26.  
  27.     TF is fairly quick in operation due to large buffers used for input and output.
  28.  
  29.     TF inputfile/switches outfile/O /switches
  30.  
  31.     Switches are:
  32.  
  33.     /L    Print line numbers
  34.  
  35.     TF will number each line, from the first line of the file to the last. 
  36.  
  37.     /U    No output graphics
  38.  
  39.     TF will not do bold, underline nor double strike. For many printers this speeds up printing time greatly. Goodì
  40. for making rough drafts.
  41.  
  42.     /C    'C' source file
  43.  
  44.     This causes TF to not generate a left margin, and to count wiggly brackets, comments and other C things, andì
  45. puts one function on a page. If there are unbalanced parenthesis, brackets or comments, TF will tell you.
  46.  
  47.     /T    Top of page title
  48.  
  49.     TF will print a header at the top of each page that lists the filename and time and date.
  50.  
  51.     n/P    Start at page n
  52.  
  53.     TF will start printing at page number n. Please note that this is affected by any .pn commands in the file.
  54.  
  55.     n/N    Print only n pages
  56.  
  57.     TF normally prints until the end of the fiel; this tells TF to print only n pages.
  58.  
  59.     outfile/O Send output to outfile
  60.  
  61.     Changes the output filename from PRN to whatever you specify.
  62. .pa
  63.             Control Characters
  64.  
  65.     TF does not output control codes found in the file. Instead, control codes are used to define "macros"; theì
  66. contents of each macro defined is output instead of the control codes. The most common control codes are predefined asì
  67. macros: CR returns CR, LF returns LF, etc. Others are preset to support Okidata 192 printer functtions.
  68.  
  69.     Esentially, TF uses the control code as an index into a table; the contents of the table, if any, are output,ì
  70. not the actual control code.
  71.  
  72.     Please refer to the .def dot command for details on loading strings. Strings must be 8 characters or less.
  73.  
  74.     The special WordStar like functions, ^B (bold), ^D (double strike) and ^S (underline) are handled specially. Ifì
  75. there is a macro defined for these characters, then it is output; if not, then the backspace/print method is used. Toì
  76. "undefine" a character, define it as zero.
  77.  
  78.     The following are the predefined macros. They can be changed at any time.
  79.  
  80.     ^A    ESC W 0        Okidata double wide off
  81.     ^B    ESC E        Okidata emphasized
  82.     ^C    ESC F        Okidata emphasized off
  83.     ^E    ESC I ^C    Okidata CQ mode
  84.     ^F    ESC I ^A    Okidata DP mode
  85.     ^G    ESC W 1        Okidata double wide on
  86.     ^H    ^H        backspace
  87.     ^I    ^I        tab
  88.     ^J    ^J        linefeed
  89.     ^L    ^L        formfeed
  90.     ^M    ^M        carriage return
  91.     ^N    ESC % G        Okidata italicized on
  92.     ^O    ESC % H        Okidata italicized off
  93.     ^S    ESC - ^A    Okidata underline on
  94.     ^T    ESC - ^@    Okidata underline off
  95.     ^U    DC2        Okidata 10CPI
  96.     ^V    ESC :        Okidata 12CPI
  97.     ^W    DC4        Okidata 17.1CPI
  98.  
  99.     Note that even CR, LF, etc are defined as macros.
  100.  
  101. .pa
  102.             Dot Commands
  103.  
  104.     The dot commands all start if the leftmost column. There can be no space between the dot and the command name,ì
  105. and unknown dot commands do not generate error messages.
  106.  
  107.     Dot Command Summary
  108.  
  109.     .pa    Change page here
  110.     .he     Top of page header
  111.     .sh    Subheader.
  112.     .mt    Margin at top
  113.     .mb    Margin at bottom
  114.     .pl    Page length
  115.     .lm    Left margin
  116.     .pn    Page number
  117.     .im    Binary Image File
  118.     .def    Control Character definition
  119. .pa
  120.  
  121.     .PA
  122.  
  123.     Causes printing to start at the top of the next page. Unlike WordStar, the page number is not printed at theì
  124. bottom of the page. Page numbers can only be printed in headers or subheaders at the top of the page. See .HE and .SH.
  125.  
  126.  
  127.     .HE <text>
  128.     .SH <text>
  129.  
  130.     .HE (header) and .SH (subheader) operate in an identical manner. The header is printed at the very top of theì
  131. page, and the subheader is printed on the next line.
  132.  
  133.     The rest of the line following the .HE is used as a header at the top of each new page. If currently at the topì
  134. of a page, the new header is used immediately, otherwise it wil not take effect until the next page change.    Anyì
  135. space character immediately following the .HE is skipped. 
  136.  
  137.     Every occurence of # is replaced with the current page number. 
  138.  
  139.  
  140.     .MT <number>
  141.     .MB <number>
  142.  
  143.     .MT is the number of lines from the top edge of the paper that text is printed, and defaults to 5. The headerì
  144. and subheader are contained within the margin, i.e. text always starts at line 5 unless a .MT command changes it.
  145.  
  146.     .MB is the margin at the bottom, and is basically the number of blank lines left before the bottom edge. A newì
  147. page is started automatically if text would otherwise print in the margin area.
  148.  
  149.  
  150.     .PL <number>
  151.  
  152.     This sets the number of lines per page, and defaults to 66, which is a normal 11 inch form. 
  153.  
  154.  
  155.     .LM <number>
  156.  
  157.     Set the left margin. The default here is eight columns, i.e. each line is indented 8 columns from the left handì
  158. edge. Headers and subheaders are not affected.
  159.  
  160.     The left margin can be set to any value from 0 to 60.
  161.  
  162.  
  163.     .PN <number>
  164.  
  165.     Normally, page numbers start at 1 for the first page, and increments at every page change. .PN can be used toì
  166. set the current page number, so that any .HE or .SH commands start at that number. This can be used to reserve pages forì
  167. diagrams or photos.
  168.  
  169.  
  170.     .IN <filename>
  171.  
  172.     Include the specified file as part of the text stream. The filename can be any legal DOS path. The contents ofì
  173. the included file are treated as part of the priginal file. There can be only one level of include; included fies cannotì
  174. include others.
  175.  
  176.  
  177.     .IM <filename>
  178.  
  179.     Image file; this is a special file format for including graphic or other non-ASCII data.
  180.  
  181.     The beginning of the file is assumed to contain a CR terminated line specifying the number of print lines theì
  182. file is equivalent to. For example, if the file contains a graphic logo that consumes 6 lines when printed, the firstì
  183. line should contain "6" followed by a CR. TF reads the first line to determine the effective length of the file, thenì
  184. copies the rest of the file as-is to the output. The rest of the file can contain anything, including nulls and controlì
  185. codes.
  186.  
  187.     .DEF cc,n,n,n,n,n,n,n,n
  188.  
  189.     Define the macros string for the specified control code. All control codes except ^B, ^D, ^S, ^K and ^P can beì
  190. defined for output.
  191.  
  192.     All numbers are in decimal. The first number following the .DEF statement is the code to be defined; 0 cannot beì
  193. used. Up to 8 values can follow. Use 128 to insert a null.
  194.  
  195.     Some are predefined; please refer to the control code section.
  196.